package com.efast.dmom.mgmt.service.mes.qm.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.mes.qm.AfterQualityBean;
import com.efast.dmom.mgmt.dao.mes.qm.AfterQualityDao;
import com.efast.dmom.mgmt.service.mes.qm.AfterQualityService;

@Service
public class AfterQualityServiceImpl implements AfterQualityService{
	
	@Autowired
	private AfterQualityDao afterQualityDao;

	@Override
	public ResultBean verifyRepetition(AfterQualityBean afterQualityBean) {
		ResultBean resultBean =  new ResultBean(true,"");
		int qty = afterQualityDao.verifyRepetition(afterQualityBean);
		if (qty > 0) {
			resultBean.setSuccess(false);
			resultBean.setMessage("该条数据已重复！");
			return resultBean;
		}
		return resultBean;
	}

}
